package com.app.activity;

import android.os.Bundle;
import android.support.v7.widget.RecyclerView;

import com.app.R;
import com.app.adapter.ActivteAdapter;
import com.app.manager.BetterLinearLayoutManager;
import com.app.model.bean.User;
import com.app.model.response.ResObj;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class ActivityActive extends ActivityBaseMenuImage {

    @BindView(R.id.recyclerView)
    RecyclerView recyclerView;

    private ActivteAdapter adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_active);
        ButterKnife.bind(this);
        setTitle("活动中心");
        adapter = new ActivteAdapter(this);
        recyclerView.setLayoutManager(new BetterLinearLayoutManager(this));
        recyclerView.setAdapter(adapter);
        List<User> userList = new ArrayList<User>();
        for (int i = 0; i< 10;i++) {
            User user = new User();
            userList.add(user);
        }
        adapter.setItems(userList);
    }

    @Override
    public void onRequestSuccess(String url, ResObj result, boolean isFrmCache) {

    }

    @Override
    public void onRequestError(String url, int statusCode, String error) {

    }

    @Override
    public void onBackPressed() {
        finish();
        overridePendingTransition(0, R.anim.push_left_out);
    }
}
